/** * * HydraulicsConstants * * Library of hydraulics contants */ public class HydraulicsConstants { public static int squareFeetPerAcre() { return 43560; } public static double convertAcresToSquareFeet(double acres) { return acres * HydraulicsConstants.squareFeetPerAcre(); } public static double gallonsPerCubicFoot() { return 7.48; } public static int acresPerSquareMile() { return 640; } public static double convertSquareMilestoAcres(double squareMiles) { return squareMiles * HydraulicsConstants.acresPerSquareMile(); } public static double standardAtmosphericPressureAsPoundPerSquareInch() { return 14.7; } public static double gravitationalConstanAsFeetPerSquareSecond() { return 32.2; } public static double waterSpecificWeightAsPoundPerCubicFoot() { return 62.3; } }
private void sample1() { prn("squareFeetPerAcre: " + HydraulicsConstants.squareFeetPerAcre()); prn("convertAcresToSquareFeet(2): " + HydraulicsConstants.convertAcresToSquareFeet(2)); prn("acresPerSquareMile: " + HydraulicsConstants.acresPerSquareMile()); prn("convertSquareMilestoAcres(3): " + HydraulicsConstants.convertSquareMilestoAcres(3)); }